<?php

declare(strict_types=1);

namespace App\CustHub\Mapper;

use App\CustHub\Model\ChOpSchemeSyncSwitch;
use Hyperf\Database\Model\Builder;
use Hyperf\Database\Model\Model;
use Mine\Abstracts\AbstractMapper;
use Mine\MineModel;

class ChOpSchemeSyncSwitchMapper extends AbstractMapper
{
    public function assignModel()
    {
        $this->model = ChOpSchemeSyncSwitch::class;
    }

    public function findByType(mixed $type): MineModel|Model|string|Builder|null
    {
        return $this->model::query()->where('type',$type)->first();
    }
}